package com.fund.serializer;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;


/**
 * 长字符串序列化器
 *
 * @author Tght
 * @date 2022/12/15
 */
public class LongToStringSerializer extends JsonSerializer<Long> {
    @Override
    public void serialize(Long l, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeString(l.toString());
    }
}
